package ua.org.oa.ishchenko;

public class App {

	public static void main(String[] args) {
	Cat cat1 = new Cat("Murka", 2);
	System.out.println("cat1: Name " + cat1.getName() + ", Age " + cat1.getAge());
	
	Dog dog1 = new Dog("Sharik", 3);
	System.out.println("dog1: Name " + dog1.getName() + ", Age " + dog1.getAge());
	}
}
class Animal{
private int age;
public int getAge() {
	return age;
}
public void setAge(int age) {
	this.age = age;
}


private String name;

public String getName() {
	return name;
}
public void setName(String name) {
	this.name = name;
}

Animal(String name, int age){
	setAge(age);
	setName(name);
	}
}

class Dog extends Animal{
	Dog(String name, int age){
	super( name,  age);
	}
	
}

class Cat extends Animal{
	Cat(String name, int age){
		super( name,  age);
		
	}
	
}